Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue 2676] Create a GET /users/:userID endpoint #3041

Merged
merged 31 commits into from
Nov 26, 2024
Merged

Conversation

babebe
Copy link
Collaborator

@babebe babebe commented Nov 26, 2024

Summary

Fixes #{2676}

Time to review: 15 mins

Changes proposed

Created GET v1/users/:user_id endpoint ( expected user_id type UUID)
Created UserGetResponseSchema
Created get_user service method to fetch user object
Created 2 tests:

  1. Test correct user object returned
  2. Test 401 error when auth user request for another user_id

Context for reviewers

This endpoint should have authentication configured
The endpoint should validate that the user ID matches the user ID being queried and raise a 401 Unauthorized if not

Copy link
Collaborator

@mikehgrantsgov mikehgrantsgov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@babebe babebe linked an issue Nov 26, 2024 that may be closed by this pull request
3 tasks
@babebe babebe merged commit e504342 into main Nov 26, 2024
2 checks passed
@babebe babebe deleted the 2676/get-user-endpoint branch November 26, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a GET /users/:userID endpoint
3 participants